package com.iscas.dataaggregation.domain.experiment;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName faultconfig
 */
@TableName(value ="faultconfig")
@Data
public class Faultconfig implements Serializable {
    /**
     * 演练故障id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 故障演练名称
     */
    private String name;

    /**
     * 创建时间
     */
    private Date create_time;

    /**
     * 更新时间
     */
    private Date update_time;

    /**
     * 创建人id
     */
    private Integer creator_id;

    /**
     * 故障配置流程图
     */
    private String graph;

    /**
     * 故障类别配置
     */
    private String fault_type_config;

    /**
     * go端运行的name
     */
    private String node_tag;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Faultconfig other = (Faultconfig) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getName() == null ? other.getName() == null : this.getName().equals(other.getName()))
            && (this.getCreate_time() == null ? other.getCreate_time() == null : this.getCreate_time().equals(other.getCreate_time()))
            && (this.getUpdate_time() == null ? other.getUpdate_time() == null : this.getUpdate_time().equals(other.getUpdate_time()))
            && (this.getCreator_id() == null ? other.getCreator_id() == null : this.getCreator_id().equals(other.getCreator_id()))
            && (this.getGraph() == null ? other.getGraph() == null : this.getGraph().equals(other.getGraph()))
            && (this.getFault_type_config() == null ? other.getFault_type_config() == null : this.getFault_type_config().equals(other.getFault_type_config()))
            && (this.getNode_tag() == null ? other.getNode_tag() == null : this.getNode_tag().equals(other.getNode_tag()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
        result = prime * result + ((getCreate_time() == null) ? 0 : getCreate_time().hashCode());
        result = prime * result + ((getUpdate_time() == null) ? 0 : getUpdate_time().hashCode());
        result = prime * result + ((getCreator_id() == null) ? 0 : getCreator_id().hashCode());
        result = prime * result + ((getGraph() == null) ? 0 : getGraph().hashCode());
        result = prime * result + ((getFault_type_config() == null) ? 0 : getFault_type_config().hashCode());
        result = prime * result + ((getNode_tag() == null) ? 0 : getNode_tag().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", name=").append(name);
        sb.append(", create_time=").append(create_time);
        sb.append(", update_time=").append(update_time);
        sb.append(", creator_id=").append(creator_id);
        sb.append(", graph=").append(graph);
        sb.append(", fault_type_config=").append(fault_type_config);
        sb.append(", node_tag=").append(node_tag);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}